Page Index
4 D 快递100配置
JL 于 2022-10-19 16:28:54 +08:00 修改了此页面
此文件含有模棱两可的 Unicode 字符

此文件含有可能会与其他字符混淆的 Unicode 字符。 如果您是想特意这样的,可以安全地忽略该警告。 使用 Escape 按钮显示他们。

  • 登录快递100后台
  • 现在账号还只是测试客户,按提示开通成正式客户即可我们开通的时候是充值了100块钱,以官方实际条件为准

  • 配置快递100Key到配置文件base-mall-admin-dev.yml

  • 重启所有服务

  • 核心代码

//订阅快递100
String key = mallConfigProperties.getLogisticsKey();					//企业授权key
String company = entity.getLogistics();			//快递公司编码
String number = entity.getLogisticsNo();	//快递单号
String phone = orderLogistics.getTelNum();					//手机号
String callbackurl = StrUtil.format("{}{}{}", mallConfigProperties.getNotifyHost(),
        "/mallapi/orderinfo/notify-logisticsr?tenantId="+orderLogistics.getTenantId()+"&logisticsId=",orderLogistics.getId());//回调地址
String from = "";					//出发地城市
String to = "";						//目的地城市
String salt = "";					//加密串
int resultv2 = 1;					//行政区域解析
int autoCom = 0;					//单号智能识别
int interCom = 0;					//开启国际版
String departureCountry = "";		//出发国
String departureCom = "";			//出发国快递公司编码
String destinationCountry = "";		//目的国
String destinationCom = "";			//目的国快递公司编码

Kuaidi100Utils kuaidi100Utils = new Kuaidi100Utils(key);
String result = kuaidi100Utils.subscribeData(company, number, from, to, callbackurl, salt, resultv2, autoCom, interCom, departureCountry, departureCom, destinationCountry, destinationCom, phone);
JSONObject jSONObject = JSONUtil.parseObj(result);